package com.woniuxy.dao;

import com.woniuxy.entity.RbacManager;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

//用户管理的dao层

@Mapper
public interface RbacManagerDao {
    @Select("select * from rbac_manager where id = #{id}")
    RbacManager findOne(int id);

    List<RbacManager> findAll();

    int addOne(RbacManager rbacManager);

    int updateOne(RbacManager rbacManager);

    @Delete("delete from rbac_manager where id = #{id}")
    int deleteOne(int id);

    List<RbacManager> findOneByLikeName(String name);

    List<RbacManager> findByIds(@Param("ids") Integer[] ids);

    int addOneForMap(Map<String, Object> userinfo);
}
